class run_txt
{
    public static void main(String[] args)
    {
        Runtime r =Runtime.getRuntime();
        Process p =null;
        String cmd[]={"gedit","/home/user/my_test_file.txt"};
        try
            {
            p=r.exec(cmd);
            }
            catch(java.lang.Exception e)
            {
            }
    }
}